#!/usr/bin/perl
use strict;
use warnings;

my $command = ` 2>&1`;
if ( $? == -1 )
{
  print "command failed: $!\n";
}
else
{
  printf "command exited with value %d", $? >> 8;
}
